package tech.aistar.service.impl.notecom;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tech.aistar.entity.notecom.Com;
import tech.aistar.mapper.notecom.ComMapper;
import tech.aistar.service.notecom.IComService;

import java.util.List;

/**
 * Created by Administrator on 2019/10/7.
 */
@Service
@Transactional
public class ComServiceImpl implements IComService {
    @Autowired
    private ComMapper comMapper;

    @Override
    public List<Com> findAllComment() {
        return comMapper.findAllComment();
    }

    @Override
    public List<Com> findAllByNoteId(Integer noteId) {
        return comMapper.findAllByNoteId(noteId);
    }

    @Override
    public Com findComByComId(Integer comId) {
        return null;
    }

    @Override
    public List<Com> findOneComment(Integer noteId) {
        return comMapper.findOneComment(noteId);
    }

    @Override
    public Integer findAllComNum() {
        return comMapper.findAllComNum();
    }

    @Override
    public Integer findOneComNum(Integer noteId) {
        return comMapper.findOneComNum(noteId);
    }

    @Override
    public List<Com> findAllTwoComment(Integer floor, Integer noteId) {
        return comMapper.findAllTwoComment(floor,noteId);
    }

    @Override
    public List<Com> findTwoComment(Integer floor, Integer flag, Integer noteId) {
        return comMapper.findTwoComment(floor,flag,noteId);
    }

    @Override
    public Integer findAllByUserId(Integer userId) {
        return null;
    }

    @Override
    public Integer findAllByToUserId(Integer toUserId) {
        return null;
    }

    @Override
    public void saveComment(Com com) {
        comMapper.saveComment(com);
    }
}
